const express = require('express')
const app = express()
//引入模块
const bodyparser = require('body-parser')

//配置模块
app.use(bodyparser.urlencoded({extended: false}))

//接受参数
app.post('/add', (req, res) => {
    console.log(req.body)
    res.send(req.body)
})
app.get('/user/:id', (req, res) => {
    res.send(req.params['id'])
})

app.listen(3000)